home *** CD-ROM | disk | FTP | other *** search
- Path: pangea.Stanford.EDU!karish
- From: karish@pangea.Stanford.EDU (Chuck Karish)
- Newsgroups: comp.lang.c
- Subject: Re: extern func() declaration?
- Date: 19 Apr 1996 07:01:33 GMT
- Organization: Mindcraft, Inc.
- Message-ID: <4l7dod$a0k@nntp.Stanford.EDU>
- References: <316436C5.413E@micromedia.on.ca> <4l67qu$drk@sun001.spd.dsccc.com>
- NNTP-Posting-Host: pangea.stanford.edu
-
- In article <4l67qu$drk@sun001.spd.dsccc.com>,
- Mike McCarty <jmccarty@sun1307.spd.dsccc.com> wrote:
- >In article <316436C5.413E@micromedia.on.ca>,
- >Richard Steadman <rsteadma@micromedia.on.ca> wrote:
- >
- >)What's the difference between
- >)
- >) extern int func(void);
- >)
- >)and
- >)
- >) int func(void);
- >)
- >)when declaring functions located in another source file?
- >
- >Pedantic differences aside, they mean -exactly- the same thing.
-
- One not-so-pedantic difference is that the declaration with
- "extern" also works when the function is actually defined in
- the same source module, while the one without is liable to cause
- "multiply defined" error messages from the compiler.
- --
-
- Chuck Karish karish@mindcraft.com
- (415) 323-9000 x117 karish@pangea.stanford.edu
-